# Be sure to restart your server when you modify this file.

# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random, 
# no regular words or you'll be exposed to dictionary attacks.

ActionController::Base.session = {
  :key         => '_nerto_5_session',
  :secret      => 'c9db95cb352495e0be114d93fcb7feb6f3191a2f18d6434aafe2326c152830f1cd0b056834b7230e1036e0941d191a74af414e7080dc7cb1e33f62df3675c170'
}

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
# ActionController::Base.session_store = :active_record_store

class ActionController::Session::CookieStore
  def load_session(env)
    request = Rack::Request.new(env)
    session_data = request.cookies[@key] || request.params[@key]
    data = unmarshal(session_data) || persistent_session_id!({})
    [data[:session_id], data]
  end
end